import {Toast} from "vant";
import router from "./index";
//路由权限控制
router.beforeEach((to, from, next) => {
    // if (from.path === "/cart") {
    //     Toast("请先登录！");
    // } else next();
   ;
    to.path === "/cart" && localStorage.getItem("token") === null ? Toast("请先登录！") && setTimeout(() => {
        next("/user")
    }, 1000) : next();
})
